/*******************************************************************/
/* @ All Rights Reserved Copyright (C) 2014 broada,Co.,Ltd.        */
/*                                                                 */
/*  NAME      = frstat_ct_conns_init.c                                   */
/*  NOTE      =                                                    */
/*  DATE      = 2016/04/18 by jikw                                 */
/*******************************************************************/

#include <CUnit/Basic.h>
#include <stdlib.h>

#include "frcomm.h"
#include "frmem.h"
#include "conntrack.h"
#include "frct_comm.h"
#include "frexp_comm.h"
#include "t_frstat_ct_conn.h"

#define L7_CONNS_HASH_SIZE   100

typedef struct __l7_conns {
    int     i_l7_proto;

    unsigned long ul_conns;
    unsigned long ul_conns_avg[4];
} L7_conns;

typedef struct __ct_conns {
    unsigned long ul_conns;             //连接数
    unsigned long ul_conns_avg[4];      //历次连接数

    Frhash_header st_l7_conns;          //模块信息hash
} Frct_conns;

extern void frstat_ct_conns_destroy(void);
extern int frstat_ct_conns_init(void);

static int __suite_init(void)
{

	return 0;
}

static int __suite_cleanup(void)
{

	return 0;
}

static void case1(void)
{
    frstat_ct_conns_init();
    frstat_ct_conns_destroy();
    return;
}

int add_suite_frstat_ct_conns_init(void)
{
    CU_pSuite pSuite = NULL;

    if ((pSuite = CU_add_suite("framework frstat_ct_conns_init()", __suite_init, __suite_cleanup)) == NULL)
        return FR_FAIL;

    if (CU_add_test(pSuite, "case1", case1) == NULL)
        return FR_FAIL;

    return FR_SUCC;
}
